package edu.njucm.herbiv.utils

import org.springframework.data.domain.PageRequest
import org.springframework.data.domain.Pageable
import org.springframework.data.domain.Sort

/**
 * @Author ZhouHang
 * @Date 24/5/12 012
 */
object PageUtils {
    fun getPage(page: Int, size: Int, sortBy: String?): Pageable {
        return PageRequest.of(page - 1, size, Sort.by(sortBy))
    }
}

